<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/layui/css/layui.css" media="all"/>
    <script type="application/javascript" src="/layui/layui.all.js"></script>
</head>
<body>
<form class="layui-form" action="/nginx" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">用户id</label>
        <div class="layui-input-block">
            <input type="text" name="user_id" required lay-verify="required" placeholder="用户id" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">对方企业编码</label>
        <div class="layui-input-inline">
            <input type="text" name="job_code" required lay-verify="required" placeholder="请输入企业编码" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label">时间</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" id="test1" name="act_time" placeholder="yyyy-MM-dd">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">操作</label>
        <div class="layui-input-block">
            <select name="action" lay-verify="required">
                <option value=""></option>
                <option value="click">点击</option>
                <option value="job_collect">收藏</option>
                <option value="cv_send">投递简历</option>
                <option value="cv_upload">上传简历</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>

<script>
    //Demo
    layui.use('form', function () {
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function (data) {
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });

    layui.use('laydate', function () {
        var laydate = layui.laydate;
        //常规用法
        laydate.render({
            elem: '#test1'
        })
    });
</script>
</body>
</html>